﻿<%@ Page Language="C#" AutoEventWireup="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        lblStart.Text = Convert.ToString (DateTime.Now);
    }
</script> 

<script type="text/javascript" language="javascript">
    function Browse()
    {
        var ifUpload;
        var confirmUpload;
        ifUpload = ifu.document.form1; 
        ifUpload.myFile.click();
//        confirmUpload = confirm ("You are about to upload the file " + ifUpload.myFile.value + " to the server. Do you agree to Upload?");
//        if (confirmUpload)
//        {
            ifUpload.btnSubmit.click();
//        }
    }     
 </script>
    <title>File Upload</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="lblStart" runat="server"></asp:Label>
        <a href="#" OnClick="javascript:Browse();">Attach Files</a>
        <iframe src="Upload.aspx" frameborder="0" id="ifu" name="ifu"></iframe>
    </div>
    </form>
</body>
</html>
